home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / rdf / nsIRDFContainer.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  10KB  |  268 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIRDFContainer.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIRDFContainer_h__
  6. #define __gen_nsIRDFContainer_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsIRDFDataSource_h__
  14. #include "nsIRDFDataSource.h"
  15. #endif
  16.  
  17. #ifndef __gen_nsIRDFResource_h__
  18. #include "nsIRDFResource.h"
  19. #endif
  20.  
  21. #ifndef __gen_nsIRDFNode_h__
  22. #include "nsIRDFNode.h"
  23. #endif
  24.  
  25. #ifndef __gen_nsISimpleEnumerator_h__
  26. #include "nsISimpleEnumerator.h"
  27. #endif
  28.  
  29. /* For IDL files that don't want to include root IDL files. */
  30. #ifndef NS_NO_VTABLE
  31. #define NS_NO_VTABLE
  32. #endif
  33.  
  34. /* starting interface:    nsIRDFContainer */
  35. #define NS_IRDFCONTAINER_IID_STR "d4214e90-fb94-11d2-bdd8-00104bde6048"
  36.  
  37. #define NS_IRDFCONTAINER_IID \
  38.   {0xd4214e90, 0xfb94, 0x11d2, \
  39.     { 0xbd, 0xd8, 0x00, 0x10, 0x4b, 0xde, 0x60, 0x48 }}
  40.  
  41. class NS_NO_VTABLE nsIRDFContainer : public nsISupports {
  42.  public: 
  43.  
  44.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IRDFCONTAINER_IID)
  45.  
  46.   /* readonly attribute nsIRDFDataSource DataSource; */
  47.   NS_IMETHOD GetDataSource(nsIRDFDataSource * *aDataSource) = 0;
  48.  
  49.   /* readonly attribute nsIRDFResource Resource; */
  50.   NS_IMETHOD GetResource(nsIRDFResource * *aResource) = 0;
  51.  
  52.   /**
  53.      * Initialize the container wrapper to the specified resource
  54.      * using the specified datasource for context.
  55.      */
  56.   /* void Init (in nsIRDFDataSource aDataSource, in nsIRDFResource aContainer); */
  57.   NS_IMETHOD Init(nsIRDFDataSource *aDataSource, nsIRDFResource *aContainer) = 0;
  58.  
  59.   /**
  60.      * Return the number of elements in the container. Note that this
  61.      * may not always be accurate due to aggregation.
  62.      */
  63.   /* long GetCount (); */
  64.   NS_IMETHOD GetCount(PRInt32 *_retval) = 0;
  65.  
  66.   /**
  67.      * Return an enumerator that can be used to enumerate the contents
  68.      * of the container in ascending order.
  69.      */
  70.   /* nsISimpleEnumerator GetElements (); */
  71.   NS_IMETHOD GetElements(nsISimpleEnumerator **_retval) = 0;
  72.  
  73.   /**
  74.      * Append an element to the container, assigning it the next
  75.      * available ordinal.
  76.      */
  77.   /* void AppendElement (in nsIRDFNode aElement); */
  78.   NS_IMETHOD AppendElement(nsIRDFNode *aElement) = 0;
  79.  
  80.   /**
  81.      * Remove the first occurence of the specified element from the
  82.      * container. If aRenumber is 'true', then the underlying RDF graph
  83.      * will be 're-numbered' to account for the removal.
  84.      */
  85.   /* void RemoveElement (in nsIRDFNode aElement, in boolean aRenumber); */
  86.   NS_IMETHOD RemoveElement(nsIRDFNode *aElement, PRBool aRenumber) = 0;
  87.  
  88.   /**
  89.      * Insert aElement at the specified index. If aRenumber is 'true', then
  90.      * the underlying RDF graph will be 're-numbered' to accomodate the new
  91.      * element.
  92.      */
  93.   /* void InsertElementAt (in nsIRDFNode aElement, in long aIndex, in boolean aRenumber); */
  94.   NS_IMETHOD InsertElementAt(nsIRDFNode *aElement, PRInt32 aIndex, PRBool aRenumber) = 0;
  95.  
  96.   /**
  97.      * Remove the element at the specified index. If aRenumber is 'true', then
  98.      * the underlying RDF graph will be 're-numbered' to account for the
  99.      * removal.
  100.      *
  101.      * @return the element that was removed.
  102.      */
  103.   /* nsIRDFNode RemoveElementAt (in long aIndex, in boolean aRenumber); */
  104.   NS_IMETHOD RemoveElementAt(PRInt32 aIndex, PRBool aRenumber, nsIRDFNode **_retval) = 0;
  105.  
  106.   /**
  107.      * Determine the index of an element in the container.
  108.      *
  109.      * @return The index of the specified element in the container. If
  110.      * the element is not contained in the container, this function
  111.      * returns '-1'.
  112.      */
  113.   /* long IndexOf (in nsIRDFNode aElement); */
  114.   NS_IMETHOD IndexOf(nsIRDFNode *aElement, PRInt32 *_retval) = 0;
  115.  
  116. };
  117.  
  118. /* Use this macro when declaring classes that implement this interface. */
  119. #define NS_DECL_NSIRDFCONTAINER \
  120.   NS_IMETHOD GetDataSource(nsIRDFDataSource * *aDataSource); \
  121.   NS_IMETHOD GetResource(nsIRDFResource * *aResource); \
  122.   NS_IMETHOD Init(nsIRDFDataSource *aDataSource, nsIRDFResource *aContainer); \
  123.   NS_IMETHOD GetCount(PRInt32 *_retval); \
  124.   NS_IMETHOD GetElements(nsISimpleEnumerator **_retval); \
  125.   NS_IMETHOD AppendElement(nsIRDFNode *aElement); \
  126.   NS_IMETHOD RemoveElement(nsIRDFNode *aElement, PRBool aRenumber); \
  127.   NS_IMETHOD InsertElementAt(nsIRDFNode *aElement, PRInt32 aIndex, PRBool aRenumber); \
  128.   NS_IMETHOD RemoveElementAt(PRInt32 aIndex, PRBool aRenumber, nsIRDFNode **_retval); \
  129.   NS_IMETHOD IndexOf(nsIRDFNode *aElement, PRInt32 *_retval); 
  130.  
  131. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  132. #define NS_FORWARD_NSIRDFCONTAINER(_to) \
  133.   NS_IMETHOD GetDataSource(nsIRDFDataSource * *aDataSource) { return _to GetDataSource(aDataSource); } \
  134.   NS_IMETHOD GetResource(nsIRDFResource * *aResource) { return _to GetResource(aResource); } \
  135.   NS_IMETHOD Init(nsIRDFDataSource *aDataSource, nsIRDFResource *aContainer) { return _to Init(aDataSource, aContainer); } \
  136.   NS_IMETHOD GetCount(PRInt32 *_retval) { return _to GetCount(_retval); } \
  137.   NS_IMETHOD GetElements(nsISimpleEnumerator **_retval) { return _to GetElements(_retval); } \
  138.   NS_IMETHOD AppendElement(nsIRDFNode *aElement) { return _to AppendElement(aElement); } \
  139.   NS_IMETHOD RemoveElement(nsIRDFNode *aElement, PRBool aRenumber) { return _to RemoveElement(aElement, aRenumber); } \
  140.   NS_IMETHOD InsertElementAt(nsIRDFNode *aElement, PRInt32 aIndex, PRBool aRenumber) { return _to InsertElementAt(aElement, aIndex, aRenumber); } \
  141.   NS_IMETHOD RemoveElementAt(PRInt32 aIndex, PRBool aRenumber, nsIRDFNode **_retval) { return _to RemoveElementAt(aIndex, aRenumber, _retval); } \
  142.   NS_IMETHOD IndexOf(nsIRDFNode *aElement, PRInt32 *_retval) { return _to IndexOf(aElement, _retval); } 
  143.  
  144. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  145. #define NS_FORWARD_SAFE_NSIRDFCONTAINER(_to) \
  146.   NS_IMETHOD GetDataSource(nsIRDFDataSource * *aDataSource) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDataSource(aDataSource); } \
  147.   NS_IMETHOD GetResource(nsIRDFResource * *aResource) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResource(aResource); } \
  148.   NS_IMETHOD Init(nsIRDFDataSource *aDataSource, nsIRDFResource *aContainer) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aDataSource, aContainer); } \
  149.   NS_IMETHOD GetCount(PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCount(_retval); } \
  150.   NS_IMETHOD GetElements(nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElements(_retval); } \
  151.   NS_IMETHOD AppendElement(nsIRDFNode *aElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendElement(aElement); } \
  152.   NS_IMETHOD RemoveElement(nsIRDFNode *aElement, PRBool aRenumber) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveElement(aElement, aRenumber); } \
  153.   NS_IMETHOD InsertElementAt(nsIRDFNode *aElement, PRInt32 aIndex, PRBool aRenumber) { return !_to ? NS_ERROR_NULL_POINTER : _to->InsertElementAt(aElement, aIndex, aRenumber); } \
  154.   NS_IMETHOD RemoveElementAt(PRInt32 aIndex, PRBool aRenumber, nsIRDFNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveElementAt(aIndex, aRenumber, _retval); } \
  155.   NS_IMETHOD IndexOf(nsIRDFNode *aElement, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IndexOf(aElement, _retval); } 
  156.  
  157. #if 0
  158. /* Use the code below as a template for the implementation class for this interface. */
  159.  
  160. /* Header file */
  161. class nsRDFContainer : public nsIRDFContainer
  162. {
  163. public:
  164.   NS_DECL_ISUPPORTS
  165.   NS_DECL_NSIRDFCONTAINER
  166.  
  167.   nsRDFContainer();
  168.  
  169. private:
  170.   ~nsRDFContainer();
  171.  
  172. protected:
  173.   /* additional members */
  174. };
  175.  
  176. /* Implementation file */
  177. NS_IMPL_ISUPPORTS1(nsRDFContainer, nsIRDFContainer)
  178.  
  179. nsRDFContainer::nsRDFContainer()
  180. {
  181.   /* member initializers and constructor code */
  182. }
  183.  
  184. nsRDFContainer::~nsRDFContainer()
  185. {
  186.   /* destructor code */
  187. }
  188.  
  189. /* readonly attribute nsIRDFDataSource DataSource; */
  190. NS_IMETHODIMP nsRDFContainer::GetDataSource(nsIRDFDataSource * *aDataSource)
  191. {
  192.     return NS_ERROR_NOT_IMPLEMENTED;
  193. }
  194.  
  195. /* readonly attribute nsIRDFResource Resource; */
  196. NS_IMETHODIMP nsRDFContainer::GetResource(nsIRDFResource * *aResource)
  197. {
  198.     return NS_ERROR_NOT_IMPLEMENTED;
  199. }
  200.  
  201. /* void Init (in nsIRDFDataSource aDataSource, in nsIRDFResource aContainer); */
  202. NS_IMETHODIMP nsRDFContainer::Init(nsIRDFDataSource *aDataSource, nsIRDFResource *aContainer)
  203. {
  204.     return NS_ERROR_NOT_IMPLEMENTED;
  205. }
  206.  
  207. /* long GetCount (); */
  208. NS_IMETHODIMP nsRDFContainer::GetCount(PRInt32 *_retval)
  209. {
  210.     return NS_ERROR_NOT_IMPLEMENTED;
  211. }
  212.  
  213. /* nsISimpleEnumerator GetElements (); */
  214. NS_IMETHODIMP nsRDFContainer::GetElements(nsISimpleEnumerator **_retval)
  215. {
  216.     return NS_ERROR_NOT_IMPLEMENTED;
  217. }
  218.  
  219. /* void AppendElement (in nsIRDFNode aElement); */
  220. NS_IMETHODIMP nsRDFContainer::AppendElement(nsIRDFNode *aElement)
  221. {
  222.     return NS_ERROR_NOT_IMPLEMENTED;
  223. }
  224.  
  225. /* void RemoveElement (in nsIRDFNode aElement, in boolean aRenumber); */
  226. NS_IMETHODIMP nsRDFContainer::RemoveElement(nsIRDFNode *aElement, PRBool aRenumber)
  227. {
  228.     return NS_ERROR_NOT_IMPLEMENTED;
  229. }
  230.  
  231. /* void InsertElementAt (in nsIRDFNode aElement, in long aIndex, in boolean aRenumber); */
  232. NS_IMETHODIMP nsRDFContainer::InsertElementAt(nsIRDFNode *aElement, PRInt32 aIndex, PRBool aRenumber)
  233. {
  234.     return NS_ERROR_NOT_IMPLEMENTED;
  235. }
  236.  
  237. /* nsIRDFNode RemoveElementAt (in long aIndex, in boolean aRenumber); */
  238. NS_IMETHODIMP nsRDFContainer::RemoveElementAt(PRInt32 aIndex, PRBool aRenumber, nsIRDFNode **_retval)
  239. {
  240.     return NS_ERROR_NOT_IMPLEMENTED;
  241. }
  242.  
  243. /* long IndexOf (in nsIRDFNode aElement); */
  244. NS_IMETHODIMP nsRDFContainer::IndexOf(nsIRDFNode *aElement, PRInt32 *_retval)
  245. {
  246.     return NS_ERROR_NOT_IMPLEMENTED;
  247. }
  248.  
  249. /* End of implementation class template. */
  250. #endif
  251.  
  252. nsresult
  253. NS_NewRDFContainer(nsIRDFContainer** aResult);
  254. nsresult
  255. NS_NewRDFContainer(nsIRDFDataSource* aDataSource,
  256.                    nsIRDFResource* aResource,
  257.                    nsIRDFContainer** aResult);
  258. /**
  259.  * Create a cursor on a container that enumerates its contents in
  260.  * order
  261.  */
  262. nsresult
  263. NS_NewContainerEnumerator(nsIRDFDataSource* aDataSource,
  264.                           nsIRDFResource* aContainer,
  265.                           nsISimpleEnumerator** aResult);
  266.  
  267. #endif /* __gen_nsIRDFContainer_h__ */
  268.